package com.zl;

import com.zl.component.Users;
import com.zl.controller.UserController;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class APP {
    public static void main(String[] args) {
        //获取spring上下文
        ApplicationContext context=new ClassPathXmlApplicationContext("spring-config.xml");

        //User user= (User) context.getBean("user2");
        //userController.user();

        UserController userController= (UserController) context.getBean("userController");

        System.out.println(userController.getUser());

    }
}
